//
//  TopLayer.m
//  FrogDrying
//
//  Created by Le Thanh Hai on 4/12/13.
//  Copyright 2013 __MyCompanyName__. All rights reserved.
//

#import "TopLayer.h"
#import "MenuLayer.h"

@implementation TopLayer
+(CCScene *) scene
{
	// 'scene' is an autorelease object.
	CCScene *scene = [CCScene node];
	
	// 'layer' is an autorelease object.
	TopLayer *layer = [TopLayer node];
	
	// add layer as a child to scene
	[scene addChild: layer];
	
	// return the scene
	return scene;
}

-(id)init
{
    if (self = [super init]) {
        ADD_BACKGROUND;
        
        /*/CGSize size = [[CCDirector sharedDirector] winSize];
        size = CGSizeMake(size.height, size.width);
        
        CCMenuItemFont *startGame = [CCMenuItemFont itemWithString:@"Start Game" block:^(id sender) {
            [[CCDirector sharedDirector] replaceScene:[CCTransitionCrossFade transitionWithDuration:0.5 scene:[MenuLayer scene]]];
        }];
        
        startGame.color = ccRED;
        
        startGame.position = ccp(size.width*0.5, size.height*0.5);
        
        CCMenu *menu = [CCMenu menuWithItems:startGame, nil];
        menu.anchorPoint = CGPointZero;
        menu.position = CGPointZero;
        [self addChild:menu];/*/
    }
    return self;
}
@end
